package demo;

import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import demo.interceptor.DemoInterceptor;
import demo.model.Zperson;
import demo.service.ZpersonService;

/**
 * @author ml
 * @create 2017-12-26--11:47
 */
public class IndexController extends Controller {
    public void index(){
        renderText("分块配置");
    }

    @Before(DemoInterceptor.class)
    public void getZpersonById(){
        String id=getPara();
        System.out.println(id);
        Zperson zperson=ZpersonService.me.getZpersonById(id);
        /*Map<String,String> map=new HashMap<String, String>();
        map.put("name",zperson.getStr("name"));
        map.put("pidno",zperson.getStr("pidno"));
        renderJson(map);*/
        renderJson(zperson);
    }
}
